import 'package:flutter/cupertino.dart';

import '../../lib_basemodel/user/user.dart';

class RoomMicModel {
  RoomMicModel({
    this.index,
    this.maskedIndex,
    this.status,
    this.micUser,
    this.pkMicStatus,
    this.micName,
    this.emblem,
    this.changeTime,
    this.roomNo,
  });

  RoomMicModel.fromJson(dynamic json) {
    index = json['index'];
    maskedIndex = json['maskedIndex'];
    status = json['status'];
    if (json['micUser'] != null) {
      debugPrint("micUser ----- ${json['micUser']}");
      micUser = User.fromJson(json['micUser'] as Map<String, dynamic>);
    }
    pkMicStatus = json['pkMicStatus'];
    micName = json['micName'];
    emblem = json['emblem'];
    changeTime = json['changeTime'];
    roomNo = json['roomNo'];
  }

  int? index;
  int? maskedIndex;
  int? status;
  User? micUser;
  int? pkMicStatus;
  String? micName;
  dynamic emblem;
  int? changeTime;
  String? roomNo;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['index'] = index;
    map['maskedIndex'] = maskedIndex;
    map['status'] = status;
    map['micUser'] = micUser;
    map['pkMicStatus'] = pkMicStatus;
    map['micName'] = micName;
    map['emblem'] = emblem;
    map['changeTime'] = changeTime;
    map['roomNo'] = roomNo;
    return map;
  }
}
